< previous page page_394 next page >

Page 394
2. Open a new Visual Basic project. For the class, RichTextFile, create a method that searches the contends of a file for any word. Use a less-important plain ASCII text file on your hard disk.
3. Open a new Visual Basic project. Using methods similar to RDO's MoveFirst, MoveNext, MovePrevious, and MoveLast, implement methods that assign each column to corresponding variables from a file, displaying the contends in a form. Use the following kinds of information for some arbitrary class, Person:
LastName As String
FirstName As String
BirthDate As Date
LastName = Smith
FirstName = John
BirthDate = #01/31/60#
Create a controller class, CPersonController, for the form frmPerson. Declare a private reference to the form. Create a method in CPersonController, initializeSystem, to add the information to a file and then load it back into variables, assigning the variable values to class properties. Display the values of the properties in the form. Add a code module as well as a Sub Main. In Sub Main, call the method initializeSystem.

 
< previous page page_394 next page >

If you like this book, buy it!